﻿
using System;


namespace PuertsStaticWrap
{
    public static class System_Threading_Tasks_Task_Wrap
    {
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8ConstructorCallback))]
        private static IntPtr Constructor(IntPtr isolate, IntPtr info, int paramLen, long data)
        {
            try
            {
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action>(false);
                        var result = new System.Threading.Tasks.Task(Arg0);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action>(false);
                        var Arg1 = (System.Threading.Tasks.TaskCreationOptions)argHelper1.GetInt32(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                }
                
                if (paramLen == 3)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var Arg2 = (System.Threading.Tasks.TaskCreationOptions)argHelper2.GetInt32(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1,Arg2);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = argHelper2.Get<System.Threading.CancellationToken>(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1,Arg2);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = (System.Threading.Tasks.TaskCreationOptions)argHelper2.GetInt32(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1,Arg2);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                }
                
                if (paramLen == 4)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    var argHelper3 = new Puerts.ArgumentHelper((int)data, isolate, info, 3);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false)
                        && argHelper3.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = argHelper2.Get<System.Threading.CancellationToken>(false);
                        var Arg3 = (System.Threading.Tasks.TaskCreationOptions)argHelper3.GetInt32(false);
                        var result = new System.Threading.Tasks.Task(Arg0,Arg1,Arg2,Arg3);
                        
                        
                        return Puerts.Utils.GetObjectPtr((int)data, typeof(System.Threading.Tasks.Task), result);
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to System.Threading.Tasks.Task constructor");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
            return IntPtr.Zero;
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_Start(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                if (paramLen == 0)
                {
                    
                    
                    
                    
                    {
                        
                        obj.Start();
                        
                        
                        
                        return;
                    }
                }
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.TaskScheduler), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.TaskScheduler>(false);
                        obj.Start(Arg0);
                        
                        
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to Start");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_RunSynchronously(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                if (paramLen == 0)
                {
                    
                    
                    
                    
                    {
                        
                        obj.RunSynchronously();
                        
                        
                        
                        return;
                    }
                }
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.TaskScheduler), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.TaskScheduler>(false);
                        obj.RunSynchronously(Arg0);
                        
                        
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to RunSynchronously");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_Dispose(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                
                {
                    
                    
                    
                    
                    {
                        
                        obj.Dispose();
                        
                        
                        
                        
                    }
                }
                
                
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_GetAwaiter(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                
                {
                    
                    
                    
                    
                    {
                        
                        var result = obj.GetAwaiter();
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        
                    }
                }
                
                
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_ConfigureAwait(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    
                    {
                        
                        var Arg0 = argHelper0.GetBoolean(false);
                        var result = obj.ConfigureAwait(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        
                    }
                }
                
                
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_Yield(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                
                {
                    
                    
                    
                    
                    {
                        
                        var result = System.Threading.Tasks.Task.Yield();
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        
                    }
                }
                
                
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_Wait(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                if (paramLen == 0)
                {
                    
                    
                    
                    
                    {
                        
                        obj.Wait();
                        
                        
                        
                        return;
                    }
                }
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.TimeSpan), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.TimeSpan>(false);
                        var result = obj.Wait(Arg0);
                        
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.CancellationToken>(false);
                        obj.Wait(Arg0);
                        
                        
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.GetInt32(false);
                        var result = obj.Wait(Arg0);
                        
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.Number, null, false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.GetInt32(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = obj.Wait(Arg0,Arg1);
                        
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to Wait");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void M_ContinueWith(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task>), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task>>(false);
                        var result = obj.ContinueWith(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task>>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = obj.ContinueWith(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.TaskScheduler), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task>>(false);
                        var Arg1 = argHelper1.Get<System.Threading.Tasks.TaskScheduler>(false);
                        var result = obj.ContinueWith(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task>>(false);
                        var Arg1 = (System.Threading.Tasks.TaskContinuationOptions)argHelper1.GetInt32(false);
                        var result = obj.ContinueWith(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task, System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task, System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var result = obj.ContinueWith(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 4)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    var argHelper3 = new Puerts.ArgumentHelper((int)data, isolate, info, 3);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.Number, null, false, false)
                        && argHelper3.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.TaskScheduler), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task>>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var Arg2 = (System.Threading.Tasks.TaskContinuationOptions)argHelper2.GetInt32(false);
                        var Arg3 = argHelper3.Get<System.Threading.Tasks.TaskScheduler>(false);
                        var result = obj.ContinueWith(Arg0,Arg1,Arg2,Arg3);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 3)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task, System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task, System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = argHelper2.Get<System.Threading.CancellationToken>(false);
                        var result = obj.ContinueWith(Arg0,Arg1,Arg2);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task, System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.TaskScheduler), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task, System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = argHelper2.Get<System.Threading.Tasks.TaskScheduler>(false);
                        var result = obj.ContinueWith(Arg0,Arg1,Arg2);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task, System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task, System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = (System.Threading.Tasks.TaskContinuationOptions)argHelper2.GetInt32(false);
                        var result = obj.ContinueWith(Arg0,Arg1,Arg2);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 5)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    var argHelper3 = new Puerts.ArgumentHelper((int)data, isolate, info, 3);
                    var argHelper4 = new Puerts.ArgumentHelper((int)data, isolate, info, 4);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action<System.Threading.Tasks.Task, System.Object>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Any, typeof(System.Object), false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false)
                        && argHelper3.IsMatch(Puerts.JsValueType.Number, null, false, false)
                        && argHelper4.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.TaskScheduler), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action<System.Threading.Tasks.Task, System.Object>>(false);
                        var Arg1 = argHelper1.Get<System.Object>(false);
                        var Arg2 = argHelper2.Get<System.Threading.CancellationToken>(false);
                        var Arg3 = (System.Threading.Tasks.TaskContinuationOptions)argHelper3.GetInt32(false);
                        var Arg4 = argHelper4.Get<System.Threading.Tasks.TaskScheduler>(false);
                        var result = obj.ContinueWith(Arg0,Arg1,Arg2,Arg3,Arg4);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to ContinueWith");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_WaitAll(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                if (paramLen >= 0)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task), false, false))
                    {
                        
                        var Arg0 = argHelper0.GetParams<System.Threading.Tasks.Task>(info, 0, paramLen);
                        System.Threading.Tasks.Task.WaitAll(Arg0);
                        
                        
                        
                        return;
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.TimeSpan), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.Get<System.TimeSpan>(false);
                        var result = System.Threading.Tasks.Task.WaitAll(Arg0,Arg1);
                        
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.GetInt32(false);
                        var result = System.Threading.Tasks.Task.WaitAll(Arg0,Arg1);
                        
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        System.Threading.Tasks.Task.WaitAll(Arg0,Arg1);
                        
                        
                        
                        return;
                    }
                }
                
                if (paramLen == 3)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Number, null, false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.GetInt32(false);
                        var Arg2 = argHelper2.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.WaitAll(Arg0,Arg1,Arg2);
                        
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to WaitAll");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_WaitAny(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                if (paramLen >= 0)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task), false, false))
                    {
                        
                        var Arg0 = argHelper0.GetParams<System.Threading.Tasks.Task>(info, 0, paramLen);
                        var result = System.Threading.Tasks.Task.WaitAny(Arg0);
                        
                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.TimeSpan), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.Get<System.TimeSpan>(false);
                        var result = System.Threading.Tasks.Task.WaitAny(Arg0,Arg1);
                        
                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.WaitAny(Arg0,Arg1);
                        
                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.GetInt32(false);
                        var result = System.Threading.Tasks.Task.WaitAny(Arg0,Arg1);
                        
                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 3)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    var argHelper2 = new Puerts.ArgumentHelper((int)data, isolate, info, 2);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task[]), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.Number, null, false, false)
                        && argHelper2.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.Tasks.Task[]>(false);
                        var Arg1 = argHelper1.GetInt32(false);
                        var Arg2 = argHelper2.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.WaitAny(Arg0,Arg1,Arg2);
                        
                        Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to WaitAny");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_FromException(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    
                    {
                        
                        var Arg0 = argHelper0.Get<System.Exception>(false);
                        var result = System.Threading.Tasks.Task.FromException(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        
                    }
                }
                
                
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_FromCanceled(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    
                    {
                        
                        var Arg0 = argHelper0.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.FromCanceled(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        
                    }
                }
                
                
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_Run(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action>(false);
                        var result = System.Threading.Tasks.Task.Run(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Func<System.Threading.Tasks.Task>), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Func<System.Threading.Tasks.Task>>(false);
                        var result = System.Threading.Tasks.Task.Run(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Action), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Action>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.Run(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject | Puerts.JsValueType.Function, typeof(System.Func<System.Threading.Tasks.Task>), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Func<System.Threading.Tasks.Task>>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.Run(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to Run");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_Delay(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.TimeSpan), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.TimeSpan>(false);
                        var result = System.Threading.Tasks.Task.Delay(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.Number, null, false, false))
                    {
                        
                        var Arg0 = argHelper0.GetInt32(false);
                        var result = System.Threading.Tasks.Task.Delay(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 2)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.TimeSpan), false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.TimeSpan>(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.Delay(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                    if (argHelper0.IsMatch(Puerts.JsValueType.Number, null, false, false)
                        && argHelper1.IsMatch(Puerts.JsValueType.NativeObject, typeof(System.Threading.CancellationToken), false, false))
                    {
                        
                        var Arg0 = argHelper0.GetInt32(false);
                        var Arg1 = argHelper1.Get<System.Threading.CancellationToken>(false);
                        var result = System.Threading.Tasks.Task.Delay(Arg0,Arg1);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to Delay");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_WhenAll(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Collections.Generic.IEnumerable<System.Threading.Tasks.Task>), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Collections.Generic.IEnumerable<System.Threading.Tasks.Task>>(false);
                        var result = System.Threading.Tasks.Task.WhenAll(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen >= 0)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task), false, false))
                    {
                        
                        var Arg0 = argHelper0.GetParams<System.Threading.Tasks.Task>(info, 0, paramLen);
                        var result = System.Threading.Tasks.Task.WhenAll(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to WhenAll");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void F_WhenAny(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                
                if (paramLen >= 0)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Threading.Tasks.Task), false, false))
                    {
                        
                        var Arg0 = argHelper0.GetParams<System.Threading.Tasks.Task>(info, 0, paramLen);
                        var result = System.Threading.Tasks.Task.WhenAny(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                if (paramLen == 1)
                {
                    
                    var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
                    
                    
                    if (argHelper0.IsMatch(Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject, typeof(System.Collections.Generic.IEnumerable<System.Threading.Tasks.Task>), false, false))
                    {
                        
                        var Arg0 = argHelper0.Get<System.Collections.Generic.IEnumerable<System.Threading.Tasks.Task>>(false);
                        var result = System.Threading.Tasks.Task.WhenAny(Arg0);
                        
                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        
                        return;
                    }
                }
                
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to WhenAny");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_Id(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.Id;
                Puerts.PuertsDLL.ReturnNumber(isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_CurrentId(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                var result = System.Threading.Tasks.Task.CurrentId;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_Exception(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.Exception;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_Status(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.Status;
                Puerts.PuertsDLL.ReturnNumber(isolate, info, (int)result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_IsCanceled(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.IsCanceled;
                Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_IsCompleted(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.IsCompleted;
                Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_CreationOptions(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.CreationOptions;
                Puerts.PuertsDLL.ReturnNumber(isolate, info, (int)result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_AsyncState(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.AsyncState;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_Factory(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                var result = System.Threading.Tasks.Task.Factory;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_CompletedTask(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                
                var result = System.Threading.Tasks.Task.CompletedTask;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        private static void G_IsFaulted(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as System.Threading.Tasks.Task;
                var result = obj.IsFaulted;
                Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
        }
        
        
        
        
        
        public static Puerts.TypeRegisterInfo GetRegisterInfo()
        {
            return new Puerts.TypeRegisterInfo()
            {
                BlittableCopy = false,
                Constructor = Constructor,
                Methods = new System.Collections.Generic.Dictionary<Puerts.MethodKey, Puerts.V8FunctionCallback>()
                {
                    { new Puerts.MethodKey {Name = "Start", IsStatic = false},  M_Start },
                    { new Puerts.MethodKey {Name = "RunSynchronously", IsStatic = false},  M_RunSynchronously },
                    { new Puerts.MethodKey {Name = "Dispose", IsStatic = false},  M_Dispose },
                    { new Puerts.MethodKey {Name = "GetAwaiter", IsStatic = false},  M_GetAwaiter },
                    { new Puerts.MethodKey {Name = "ConfigureAwait", IsStatic = false},  M_ConfigureAwait },
                    { new Puerts.MethodKey {Name = "Yield", IsStatic = true},  F_Yield },
                    { new Puerts.MethodKey {Name = "Wait", IsStatic = false},  M_Wait },
                    { new Puerts.MethodKey {Name = "ContinueWith", IsStatic = false},  M_ContinueWith },
                    { new Puerts.MethodKey {Name = "WaitAll", IsStatic = true},  F_WaitAll },
                    { new Puerts.MethodKey {Name = "WaitAny", IsStatic = true},  F_WaitAny },
                    { new Puerts.MethodKey {Name = "FromException", IsStatic = true},  F_FromException },
                    { new Puerts.MethodKey {Name = "FromCanceled", IsStatic = true},  F_FromCanceled },
                    { new Puerts.MethodKey {Name = "Run", IsStatic = true},  F_Run },
                    { new Puerts.MethodKey {Name = "Delay", IsStatic = true},  F_Delay },
                    { new Puerts.MethodKey {Name = "WhenAll", IsStatic = true},  F_WhenAll },
                    { new Puerts.MethodKey {Name = "WhenAny", IsStatic = true},  F_WhenAny },
                    
                },
                Properties = new System.Collections.Generic.Dictionary<string, Puerts.PropertyRegisterInfo>()
                {
                    {"Id", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_Id, Setter = null} },
                    {"CurrentId", new Puerts.PropertyRegisterInfo(){ IsStatic = true, Getter = G_CurrentId, Setter = null} },
                    {"Exception", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_Exception, Setter = null} },
                    {"Status", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_Status, Setter = null} },
                    {"IsCanceled", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_IsCanceled, Setter = null} },
                    {"IsCompleted", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_IsCompleted, Setter = null} },
                    {"CreationOptions", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_CreationOptions, Setter = null} },
                    {"AsyncState", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_AsyncState, Setter = null} },
                    {"Factory", new Puerts.PropertyRegisterInfo(){ IsStatic = true, Getter = G_Factory, Setter = null} },
                    {"CompletedTask", new Puerts.PropertyRegisterInfo(){ IsStatic = true, Getter = G_CompletedTask, Setter = null} },
                    {"IsFaulted", new Puerts.PropertyRegisterInfo(){ IsStatic = false, Getter = G_IsFaulted, Setter = null} },
                    
                }
            };
        }
        
    }
}